﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using BISPOS.Repository;

namespace BISPOS
{
    public partial class AddSupplierForm : DevExpress.XtraEditors.XtraForm
    {
        SupplierRepository repository = new SupplierRepository();
        public AddSupplierForm()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                repository.AddSupplier(textEdit1.Text, memoEdit1.Text, textEdit2.Text, textEdit3.Text);
                this.Close();
            }
            catch
            {
                MessageBox.Show("เกิดความผิดพลาด");
            }
        }
    }
}